#pragma once
#include "SRP.h"
#include <iostream>

/** @brief IUserPrinter 打印用户信息接口 */
class IUserPrinter
{
public:
	virtual ~IUserPrinter() = default;

	virtual void print(const class User& user) = 0;
};

class ConsoleUserPrinter : public IUserPrinter
{
public:
	virtual ~ConsoleUserPrinter() = default;

	void print(const User& user) override 
	{
		std::cout << "Name: " << user.GetName() << std::endl;
		std::cout << "Email: " << user.GetEmail() << std::endl;
	}
};

class  FileUserPrinter : public IUserPrinter
{
public:
	virtual ~FileUserPrinter() = default;
	
	void print(const User& user) override
	{
		std::cout << "File Name: " << user.GetName() << std::endl;
		std::cout << "File Email: " << user.GetEmail() << std::endl;
	}
};